package es.xpt.ysf.model;

import java.io.Serializable;
import java.util.Comparator;

@SuppressWarnings("serial")
public class ItemComparatorByDescription<E extends Item> implements Comparator<E>, Serializable {

	@Override
	public int compare(E o1, E o2) {
		if ( o1.getDescription() != null && o2.getDescription()!=null )
			return o1.getDescription().compareTo(o2.getDescription());
		
		return 0;
	}


}
